package algorithm;

public class Entropy {
	public static double calc(double p, double n){	
		double a = -(p/(p+n)*(Math.log(p/(p+n)))/Math.log(2)) -(n/(p+n)*(Math.log(n/(p+n)))/Math.log(2));
		return a;
	}
}
